home *** CD-ROM | disk | FTP | other *** search
- //-------------------------------------------------------------------//
-
- // Synopsis: Jordan block.
-
- // Syntax: J = jordbloc ( N, LAMBDA )
-
- // Description:
-
- // J is the N-by-N Jordan block with eigenvalue LAMBDA.
- // LAMBDA = 1 is the default.
-
- // This file is a translation of jordbloc.m from version 2.0 of
- // "The Test Matrix Toolbox for Matlab", described in Numerical
- // Analysis Report No. 237, December 1993, by N. J. Higham.
-
- //-------------------------------------------------------------------//
-
- jordbloc = function ( n , lambda )
- {
- if (!exist (lambda)) { lambda = 1; }
-
- return lambda*eye(n, n) + diag(ones(n-1,1),1);
- };
-